home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 17
/
CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso
/
CUCD
/
Online
/
AminetParse
/
AminetParse.doc
< prev
next >
Wrap
Text File
|
1997-10-04
|
9KB
|
216 lines
AminetParse v1.05
© 1997 by Daniel J. Andrea II
NOTE: This software is offered as GIFTWARE. If you like it, then you can
send me something in payment of your choice (other programs, disks, computers,
cars, etc.) at the address at the end of this document. No warranty of any
kind is offered with this software or implied, or for suitability of purpose.
It's use is entirely at your own risk. No fees can be charged for this
software, other than the nominal fees for the cost of magnetic media and
copying of the software onto that media, not to exceed the amount of US $5 for
a disk containing this software. Copies of this software must include this
documentation file for redistribution through Fred Fish or other similar
software collections.
What is it?
===========
AminetParse is a small utility to parse Aminet RECENT or INDEX lists into
Thor's file database. This is quite a bit faster than the arexx script
supplied with Thor. I experimented quite a bit with the arexx script, but
the best I could get with it was approximately 22 files added per second.
AminetParse is quite fast. On my system, it reaches speeds in excess of
150 files added per second. In some cases I've seen it hit peaks of over
200 files per second!
RECENT/INDEX files can be filtered with the Sortmail.excl file, just like in
Sortmail. Also, as of AminetParse 1.05, a NewFiles.txt file will be created
in the proper directory just like Sortmail does. This will only be done on
RECENT listings. AminetParse does absolutely nothing with the NewFiles.txt
file when parsing INDEX listings. AminetParse will ignore any 'Message of
the day:' that may be placed at the end of a RECENT listing. I may change
this in the near future to create a message in the email conference of Thor
of the info contained within the 'Message of the day:' section.
Note: NewFiles.txt will be replaced completely every time AminetParse is
run with a RECENT listing.
AminetParse requires Thor 2.3+ (at least ver 4 of bbsread.library) and
AmigaOS 2.04+.
Installation
============
Well, it's real simple. AminetParse is a cli-only program, and can be run
from anywhere. Probably the best place would be in the bin sub-directory
of Thor's main directory. Just copy it to wherever you want to run it
from.
Just copy the AddAminet.thor script to Thor:rexx, and make sure AminetParse
is in Thor:bin. Then it can be run from within Thor whenever you want to
parse a RECENT or INDEX listing into the database.
Usage
=====
AminetParse is a shell-only program. If you try to start it from the
Workbench, you will most likely crash your machine.
Just type AminetParse in a shell and you'll get output like this:
AminetParse 1.06 (20-Sep-97) © 1997 Daniel J. Andrea II
Usage: AminetParse <system name> <Aminet INDEX/RECENT file> EXCLUDE
where <system name> is name of system to add files to
<Aminet INDEX/RECENT file> is full path and name of INDEX/RECENT file
EXCLUDE (optional) tells AminetParse to use the Sortmail.excl file
from inside the BBS's data directory to exclude certain file
areas from being added to the database.
All you need is the name of your System in Thor, as in EMail&News (that's
my BBS system name), and the full path and name of the INDEX/RECENT file.
For example:
AminetParse EMail&News SYS:temp/INDEX
will add the file INDEX from the drawer SYS:temp/ to the file database in
the Thor system EMail&News.
Or add EXCLUDE:
AminetParse EMail&News SYS:temp/INDEX EXCLUDE
will do the same as the previous example, but will use the Sortmail.excl
file from inside the data directory of the BBS you enter. If there is no
Sortmail.excl file, AminetParse will continue as if the EXCLUDE option
hadn't been entered along with a warning message.
That's it!
While AminetParse is running, you will get occasional status messages.
First it will tell you whether this is a RECENT listing, such as daily or
weekly, or a full INDEX. Then it will print out numbers periodically to
show how many files have been processed. Whenever a file area is parsed
that is not in the file database, it will automatically add it and print
out a message that it did so.
When it's finished, AmintParse will print out some statistics about the
file parsing.
To parse listings while Thor is running, just execute the rexx script
AddAminet.thor from the rexx menu. It will check for the presence of
a SortMail.excl file and prompt you if you want to filter with it.
AddAminet.thor will also prompt you to clear the file database if you are
parsing a full INDEX listing.
AminetParse now skips any extraneous data before the first real index listing
line in the file. So if you save the message to disk from Thor, you no longer
need to edit out all the header information at the start of the file.
AminetParse will check each line of text, starting from the beginning of the
file, and checks to see if the line starts with the '|' character. If it
does, then it will check to see if the same line also contains either of the
two words 'Complete' or 'Recent'. If the line does not contain one of those
words, it will scan to the end of file until it does find it. If no start
line for the listing is found, it will exit to the shell without doing
anything to the database.
Bugs
====
There are no known bugs at this time. If you find any, please contact me
at the E-Mail address or Snail-Mail address below with bug reports. Be
sure to include information on what other software was running and what
kind of system you have. Bug fixes will be incorporated into AminetParse
as soon as possible.
History
=======
v1.00 -- Initial release.
v1.01 -- Added filtering based on the Sortmail script's filtering.
AminetParse uses the same file format, and will read the
file Sortmail.excl from the BBS's data directory.
v1.02 -- Well, it did have a bug. Found my date calculation was
off by a couple of days. Now shows correct date.
v1.03 -- Added Checking for valid INDEX/RECENT file. Removed a
warning message that wasn't needed. Should fix some
problems noted by Trevor Daley.
v1.04 -- Changed date calculation again. This version should work
better now.
v1.05 -- Added NewFiles.txt creation during parsing of RECENT
listings.
v1.06 -- Fixed the parsing of weekly RECENT listings. Previous
versions just treated all the files as being on the same
day. Also will skip the 'Message of the day:' if it is
present in the RECENT listing. The date parsing from the
listing should work properly on listings from other areas
(like from ftp.doc.ic.ac.uk), as long as the date is of the
form dd-mmm-yy or dd-mmm-yyyy, where dd is the day of the
month, mmm is the month name (like Sep for September), and
yy or yyyy is the year (as in 97 or 1997). Previous
versions would not work with listings that didn't originate
from the main Aminet site (ftp.wustl.edu). It should now
work with listings from any site, but I cannot gaurantee
it will. If anyone has a problem with an Aminet listing,
please send me a copy of the listing that caused a problem.
I can test it and release a bug fix as soon as possible from
that.
Author
======
I can be contacted through Internet E-Mail at:
dandrea@unix.tfs.net
or through Snail-Mail at:
Daniel J. Andrea II
1331 Metropolitan St.
Leavenworth, KS 66048
U.S.A.
To check up on AminetParse development and other projects when they arise,
point your web browser at
http://www.tfs.net/~dandrea/
AminetParse was developed on a 25 MHz A3000 using SAS/C v6.57-6.58.
Future
======
Have you got an idea for improvement? Let me know and I'll see what I can
do.
Most likely I will be trying my hand at making an amigaguide version of this
documentation for the next release. I've never done it before, so I'll have
to study up on it some. ;)
Thanks
======
Special thanks to Petter Nilsen of the Thor team for help with my early
version of AminetParse. I couldn't see the trees in the forest so to
speak, and he helped me sort it out. Thanks, Petter!
Also, thanks to Trevor Daley for pointing out the date calculation
problems in earlier versions.
Thanks to Neil Bothwick for the Arexx script.